home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 168
/
MOBICLIC168.ISO
/
mac
/
DATA
/
GAM168
/
GAM168_00
/
GAM168_00.swf
/
scripts
/
frame_59
/
PlaceObject2_274_118
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2014-10-17
|
4KB
|
115 lines
onClipEvent(enterFrame){
if(_global.pauseOnMod == undefined)
{
if(getTimer() > origTime + 1500)
{
_root.allumePerso();
}
Mouse.hide();
_X = _root._xmouse;
_Y = _root._ymouse;
if(_X < this._width / 2)
{
_X = this._width / 2;
}
if(_X > 800 - this._width / 2)
{
_X = 800 - this._width / 2;
}
if(_Y < this._height / 2)
{
_Y = this._height / 2;
}
if(_Y > 600 - this._height / 2)
{
_Y = 600 - this._height / 2;
}
i = 0;
while(i < _root.gPersoActive.length)
{
if(this.hitTest(_root[_root.gPersoActive[i]]))
{
if(Key.isDown(37))
{
if(_currentframe === 1)
{
_root.joueBruitage({nomSon:"B_SAUVE"});
this.gotoAndPlay(3);
}
type = _root.gPersoActive[i].split("")[0];
switch(type)
{
case "V":
if(_currentframe === 3)
{
_root.joueBruitage({nomSon:"B_ECHEC"});
}
_root.gScore -= 1;
break;
case "G":
if(_currentframe === 3)
{
_root.joueBruitage({nomSon:"B_MAGIE"});
}
_root.tirG.tirTime = getTimer();
_root.tirG._x = _X;
_root.tirG._y = _Y;
_root.gScore += 1;
}
_root[_root.gPersoActive[i]]._visible = 0;
num = _root.gPersoActive[i].split("_")[1];
_root.eteindrePerso(type,num,1);
}
else if(Key.isDown(39))
{
if(_currentframe === 1)
{
_root.joueBruitage({nomSon:"B_TIR"});
this.gotoAndPlay(2);
}
type = _root.gPersoActive[i].split("")[0];
switch(type)
{
case "V":
_root.tirV.tirTime = getTimer();
_root.tirV._x = _X;
_root.tirV._y = _Y;
if(_currentframe === 2)
{
_root.joueBruitage({nomSon:"B_TUE"});
}
_root.gScore += 1;
break;
case "G":
if(_currentframe === 2)
{
_root.joueBruitage({nomSon:"B_ECHEC"});
}
_root.gScore -= 1;
}
_root[_root.gPersoActive[i]]._visible = 0;
num = _root.gPersoActive[i].split("_")[1];
_root.eteindrePerso(type,num,1);
}
}
else if(Key.isDown(37))
{
if(_currentframe === 1)
{
_root.joueBruitage({nomSon:"B_SAUVE"});
this.gotoAndPlay(3);
}
}
else if(Key.isDown(39))
{
if(_currentframe === 1)
{
_root.joueBruitage({nomSon:"B_TIR"});
this.gotoAndPlay(2);
}
}
i++;
}
}
}